package com.rexolar.openapi.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName DynamicCreateDevice
 * @Description:
 * @Author: zhusiyu
 * @CreateDate: 2024/1/24 13:17	//创建时间
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class DynamicCreateDevice {

    private DeviceBean device;
    private Credentials credentials;

    @Data
    public static class DeviceBean{
        private String name;
        private String label;
        private DeviceProfileId deviceProfileId;
        private AdditionalInfo additionalInfo;
    }

    @Data
    public static class DeviceProfileId{
        private String id;
        private String entityType = "DEVICE_PROFILE";
    }
    @Data
    public static class AdditionalInfo{
        private boolean gateway;
        private boolean overwriteActivityTime;
        private String description = "";
    }

    @Data
    public static class Credentials{
        private String credentialsType = "MQTT_BASIC";
        private String credentialsValue ;
    }
    @Data
    public static class CredentialsValue{
        private String clientId;
        private String userName;
        private String password;
    }
}
